import { http } from "@/utils/http";
import { baseUrlApi } from "./utils";

export default {
  getList: async () => {
    const result = await http.request<any>("get", baseUrlApi("/level"));
    return {
      data: result.data
    };
  },
  create: data => {
    return http.request<any>("post", baseUrlApi("/level"), { data });
  },
  update: data => {
    return http.request<any>("put", baseUrlApi("/level"), { data });
  },
  delete: data => {
    return http.request<any>("delete", baseUrlApi("/level"), { data });
  }
};
